a788c54d13244be7c9865c46b8e57cc1d13a6321,src/net/java/sip/communicator/impl/osdependent/jdic/StatusSubMenu.java,StatusSubMenu,getProtocolProviders,#,281

Before Change


        try
        {
            protocolProviderRefs
                = OsDependentActivator.bundleContext.getServiceReferences(
                    ProtocolProviderService.class.getName(), null);
        }
        catch (InvalidSyntaxException ex)
        {

After Change


    private List<ProtocolProviderService> getProtocolProviders()
    {
        BundleContext bundleContext = OsDependentActivator.bundleContext;
        Collection<ServiceReference<ProtocolProviderService>> ppsRefs
            = ServiceUtils.getServiceReferences(
                    bundleContext,
                    ProtocolProviderService.class);
        List<ProtocolProviderService> protocolProviders
            = new ArrayList<ProtocolProviderService>();

        // in case we found any
        if ((ppsRefs != null) && !ppsRefs.isEmpty())
        {
            for (ServiceReference<ProtocolProviderService> ppsRef : ppsRefs)
                protocolProviders.add(bundleContext.getService(ppsRef));